/*#include <iostream>
#include <list>
#include <algorithm>
#include <iterator> //:3 hifistelyä

using namespace std;

void moro(int i) {
  cout << i << " " ;
}


int main() {
  list<int> li;
  int t[] = {5,6,7,8,9,10};
  // Tehtävä: lisää t[] suoraan listaan "li"
  // ks. copy()-funktio algorithms-kirjastosta
  copy (t, t+6, back_inserter(li));
  for_each (li.begin(), li.end(), moro);
  cout << endl;

  // t:n perään ao. arvot
  li.push_back(1);
  li.push_back(2);
  li.push_back(3);
  li.push_back(4);
  // [5,6,7,8,9,10,1,2,3,4]

  for_each (li.begin(), li.end(), moro);
  cout << endl;  
  
  //lyhyempi
  for_each (list<int>::reverse_iterator(li.end()), list<int>::reverse_iterator(li.begin()), moro);
  cout << endl;

  for_each (reverse_iterator<list<int>::iterator>(li.end()), reverse_iterator<list<int>::iterator>(li.begin()), moro);
cout << endl;



}*/